﻿using Appliaction.Dto.Inv;
using Domain.Entitys.Inv;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Appliaction.IAppServices.Inv
{
     public  interface IInv_StockServices
    {
        //根据查询库存    
        Task<int> Getinv_stock(string weahouse_code, string por_code);


        /// <summary>
        /// 根据仓库查询库存表里面的数据进行筛选产品
        /// </summary>
        /// <param name="weahouse_code"></param>
        /// <returns></returns>
        Task<List<inv_stock>> Get_Select_weahouse_code(string weahouse_code, int currentPage, int pageSize);
        /// <summary>
        /// 查询库存里面的数据总数
        /// </summary>
        /// <param name="weahouse_code"></param>
        /// <returns></returns>
        Task<int> Get_Select_Weahouse_code_Count(string weahouse_code);


        /// <summary>
        /// 盘亏--修正库存
        /// </summary>
        /// <param name="inv_stock"></param>
        /// <returns></returns>
        Task<int> Update_inv_Stock_numder(List<Inv_Stock_numderUpdateDto> inv_stock);


        /// <summary>
        /// 根据仓库查询库存表里面的数据进行筛选产品--添加产品编码和字典编码的条件
        /// </summary>
        /// <param name="weahouse_code"></param>
        /// <param name="pro_code"></param>
        /// <param name="dict_code"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<List<inv_stock>> Get_Select_stock_All(string weahouse_code, string pro_code, int dict_code, int currentPage, int pageSize);


        /// <summary>
        /// 查询库存里面的数据总数--添加二个条件 产品码编码
        /// </summary>
        /// <param name="weahouse_code"></param>
        /// <returns></returns>
        Task<int> Get_Select__stock_Count(string weahouse_code, string pro_code, int dict_code);


        /// <summary>
        /// 修改库存的数据不合格数量
        /// </summary>
        /// <param name="weahouse_code"></param>
        /// <param name="pro_code"></param>
        /// <param name="prodInfo_totnum_uqual"></param>
        /// <returns></returns>
        // Task<int> stock_Update_stockUnqualified_numder(List<Inv_StockUpdateDto> Inv_StockUpdateDto);


        /// <summary>
        /// 修改库存
        /// </summary>
        /// <param name="Stock_UpdateTrfDto"></param>
        /// <returns></returns>
        Task<int> stock_Update_kc(List<Stock_UpdateTrfDto> Stock_UpdateTrfDto);



        //根据查询库存--详情页面
        Task<int> Getinv_stock_XQ(string weahouse_code, string por_code, string stock_entry_no);

       
        //获取商品所有下面的产品库存--产品编码
        Task<int> Get_inv_stock_totalnumber(string Pro_code);




        /// <summary>
        /// 结构入库编号,产品编号,仓库编号去查询这个产品在的库位和库区
        /// </summary>
        /// <param name="weahouse_code"></param>
        /// <param name="pro_code"></param>
        /// <returns></returns>
        Task<List<inv_stock>> Get_Select_stock_All_By_Pro_Code(string weahouse_code, string pro_code, string stock_entry_no);


        /// <summary>
        /// 其他出库单--出库减少库存
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        Task<int> Stock_update(List<Inv_stockothoutordUpdateDto>  inv_StockothoutordUpdateDtos);





        /// <summary>
        /// 根据仓库查询库存表里面的数据进行筛选产品--仓库库存模块
        /// </summary>
        /// <param name="weahouse_code"></param>
        /// <returns></returns>

        Task<List<inv_stock>> Get_Select_stock(string weahouse_code, string zone_code, string location_code, string Vendor_Code, string pro_code, int currentPage, int pageSize);


        /// <summary>
        /// 查询仓库表的数据--仓库库存模块
        /// </summary>
        /// <param name="weahouse_code"></param>
        /// <returns></returns>
        Task<int> Get_Select_stock_count(string weahouse_code, string zone_code, string location_code, string Vendor_Code, string pro_code);



        /// <summary>
        /// 选择期初入库的时候--有动态的展示库存数量
        /// </summary>
        /// <param name="warehouse_code"></param>
        /// <param name="zone_code"></param>
        /// <param name="location_code"></param>
        /// <param name="pro_code"></param>
        /// <returns></returns>
        Task<decimal> int_stock_numder(string warehouse_code, string zone_code, string location_code, string pro_code);


    }
}
